import pyglet
# avoid unnecesary directory scan
pyglet.resource.path = ['data', 'data/tiles']
pyglet.resource.reindex()
# Disable error checking for increased performance
pyglet.options['debug_gl'] = True#False

import cocos
from cocos.director import director

import gg
print 'session:',gg.session
def run_game():
    director.init(width=gg.session['width'],
                  height=gg.session['height'],
                  resizable=True)

    if gg.session['startlevel']<0:
        # standard run
        print 'splash branch'
        import splash_scene
        scene = splash_scene.get_scene()
    else:
        # fast load, for dev
        import game_scene
        scene = game_scene.get_scene(level=gg.session['startlevel'])
    director.run(scene)


    
        
        
